format PE

include "%fasminc%\win32ax.inc"
include "..\include\const.inc"

x_size          = 340
y_size          = 150
x_coord         = 100
y_coord         = 100

  start:
        call    Redraw
      Wait_Event:
        call    [WaitMessage]
        call    [StdHandler]
        jmp     Wait_Event

Redraw:
        invoke  Draw_StdWindow, x_coord*65536+y_coord,x_size*65536+y_size,"Hello World!",00101b
        invoke  Write_Text,15,0x16+10,1,4,"Hello World!",eax
        ret


data import
;
; Import functions:
;

  library mx32,'mx32.dll'

  import mx32,\
         f1,'OneFunction',\
         VirtualAlloc,'VirtualAlloc',\
         VirtualProtect,'VirtualProtect',\
         VirtualFree,'VirtualFree',\
         CreateProcess,'CreateProcess',\
         ExitProcess,'ExitProcess',\
         CreateThread,'CreateThread',\
         ExitThread,'ExitThread',\
         TestKbdInput,'TestKbdInput',\
         PutChar,'PutChar',\
         PutChar2,'PutChar2',\
         PrintString,'PrintString',\
         Get_Position,'Get_Position',\
         Set_Position,'Set_Position',\
         Set_focus,'Set_focus',\
         Set_focusPID,'Set_focusPID',\
         Get_FileAddress,'Get_FileAddress',\
         Inkey,'Inkey',\
         SendMessage,'SendMessage',\
         ReceiveMessage,'ReceiveMessage',\
         WaitMessage,'WaitMessage',\
         GetPID,'GetPID',\
         DefineWindow,'DefineWindow',\
         DefineButton,'DefineButton',\
         Put_pixel,'Put_pixel',\
         Get_screen_param,'Get_screen_param',\
         Draw_BLine,'Draw_BLine',\
         Draw_Picture,'Draw_Picture',\
         Kill_Window,'Kill_Window',\
         Write_Text,'Write_Text',\
         WriteText,'WriteText',\
         Write_Hex,'Write_Hex',\
         Draw_StdWindow,'Draw_StdWindow',\
         StdHandler,'StdHandler',\
         Draw_hLine,'Draw_hLine',\
         Get_XYSize,'Get_XYSize',\
         Get_WinParams,'Get_WinParams',\
         End_of_redraw,'End_of_redraw',\
         Begin_xDraw,'Begin_xDraw',\
         Get_focus,'Get_focus',\
         Create_CheckButton,'Create_CheckButton',\
         Create_StdButton,'Create_StdButton'
end data

